@echo off

call "%VS80COMNTOOLS%vsvars32.bat"
echo Current directory is:
cd


DEVENV /REBUILD "Release" "..\VersionInfo\VersionInfo\VersionInfo.vcproj"
if errorlevel 1 goto out

DEVENV /REBUILD "Release" "..\TouchpadTest\TouchpadTest\TouchpadTest.vcproj"
if errorlevel 1 goto out

DEVENV /REBUILD "Release" "..\LcdTest\LcdTest\LcdTest.vcproj"
if errorlevel 1 goto out

DEVENV /REBUILD "Release" "..\LedTest\LedTest\LedTest.vcproj"
if errorlevel 1 goto out

DEVENV /REBUILD "Release" "..\VibrationTest\VibrationTest\VibrationTest.vcproj"
if errorlevel 1 goto out

DEVENV /REBUILD "Release" "..\KeyboardTest\KeyboardTest\KeyboardTest.vcproj"
if errorlevel 1 goto out

DEVENV /REBUILD "Release" "..\PowerTest\PowerTest\PowerTest.vcproj"
if errorlevel 1 goto out

DEVENV /REBUILD "Release" "..\BacklightTest\BacklightTest\BacklightTest.vcproj"
if errorlevel 1 goto out

DEVENV /REBUILD "Release" "..\CameraTest\CameraTest\CameraTest.vcproj"
if errorlevel 1 goto out

DEVENV /REBUILD "Release" "..\SpeakerTest\SpeakerTest\SpeakerTest.vcproj"
if errorlevel 1 goto out

DEVENV /REBUILD "Release" "..\ReceiverTest\ReceiverTest\ReceiverTest.vcproj"
if errorlevel 1 goto out


DEVENV /REBUILD "Release" "..\EarphoneTest\EarphoneTest\EarphoneTest.vcproj"
if errorlevel 1 goto out


DEVENV /REBUILD "Release" "..\MobileMicTest\MobileMicTest\MobileMicTest.vcproj"
if errorlevel 1 goto out


DEVENV /REBUILD "Release" "..\EarphoneMicTest\EarphoneMicTest\EarphoneMicTest.vcproj"
if errorlevel 1 goto out

DEVENV /REBUILD "Release" "..\FMTest\FMTest\FMTest.vcproj"
if errorlevel 1 goto out

DEVENV /REBUILD "Release" "..\SDCardTest\SDCardTest\SDCardTest.vcproj"
if errorlevel 1 goto out


DEVENV /REBUILD "Release" "..\BluetoothTest\BluetoothTest\BluetoothTest.vcproj"
if errorlevel 1 goto out


DEVENV /REBUILD "Release" "..\GpsTest\GpsTest\GpsTest.vcproj"
if errorlevel 1 goto out


DEVENV /REBUILD "Release" "..\UIMCardTest\UIMCardTest\UIMCardTest.vcproj"
if errorlevel 1 goto out

DEVENV /REBUILD "Release" "..\SIMCardTest\UIMCardTest\UIMCardTest.vcproj"
if errorlevel 1 goto out

DEVENV /REBUILD "Release" "..\WifiTest\WifiTest\WifiTest.vcproj"
if errorlevel 1 goto out

DEVENV /REBUILD "Release" "..\MTVTest\MTVTest\MTVTest.vcproj"
if errorlevel 1 goto out

DEVENV /REBUILD "Release" "..\CurrentTest\CurrentTest\CurrentTest.vcproj"
if errorlevel 1 goto out


DEVENV /REBUILD "Release" "..\InnerCameraTest\CameraTest\CameraTest.vcproj"
if errorlevel 1 goto out





:out
if not errorlevel 1 goto skiperror
echo ****************************************************************************
echo IMPORTANT: If your .NET environment crashed during the build, you should
echo            disable all your addins and try again.  To disable the addins: 
echo              1. Start VC.NET
echo              2. Go to Tools/Add-in Manager
echo              3. Uncheck all the checkboxes in the Startup column
echo ****************************************************************************
pause

:skiperror
echo ****************************************************************************
echo IMPORTANT: Build OK
echo ****************************************************************************
